<!--<?php
print <<<EOT
-->


<div class="div_out_inner_nobg">
<table width="100%"><tr><td class="position" style="width:400px;"><span>当前位置:</span> {$_SYS['positionindex']} » <a href="{$_SYS['indexurl']}">首页</a></td>
<td>
<div class="static_out">
	<ul>
		<li>今日<em><a href="search.php?action=new">{$cache1['todaynum']}</a></em></li>
		<li>昨日<em>{$cache1['yesterdaynum']}</em></li>
		<li>最高日<em>{$cache1['mostnum']}</em></li>
		<li>主题<em>{$cache1['topicsnum']}</em></li>
		<li>帖子<em>{$cache1['postsnum']}</em></li>
		<li>会员<em>{$cache1['usersnum']}</em></li>
		<li>新会员<em><a href="user.php?username={$cache1['lastuser']}" class="spc">{$cache1['lastuser']}</a></em></li>
	</ul>
</div>
</td></tr></table>

</div>
{$adcode[3]}


<!--
EOT;
if(!empty($announce_index)){
print <<<EOT
-->
<div class="div_out index_anc">
	<div id="announce_index_div">{$announce_index}</div>
</div>
<!--
EOT;
}
print <<<EOT
-->
<div class="div_out index_hotnew">
	<table class="title">
		<tr>
			<td class="left"></td>
			<td>今日推荐</td>
			<td class="right"></td>
		</tr>
	</table>
	<div class="index_hotnew_out">
	<table class="hotnew">
		<tr>
			<td class="">
<!--
EOT;
$newtopicstr='';
$newtopics=$db->row_select("topics","verifystate=0 and isrecycle=0",15,"id,fid,title,username,highlight,posttime,ordertime,lastreply","ordertime desc");
$newi=0;
foreach($newtopics as $newtopic){
	$newi++;
	$newtopic['title']=htmlFilter($newtopic['title']);
	$newtopic['username']=htmlFilter($newtopic['username']);
	if(!empty($newtopic['highlight'])){
		$newtopic['title']=genHighLighStr($newtopic['highlight'],$newtopic['title']);
	}
	if($newtopic['posttime']==$newtopic['ordertime']){
		$newtopic['posttime']=getDateStr($newtopic['posttime']);
		$linktitle="{$newtopic['username']} 发表于 {$newtopic['posttime']}";
	}else{
		$lastre=explode("\t",$newtopic['lastreply']);
		$linktitle=htmlFilter($lastre[1])." 回复于 ".getDateStr($lastre[0]);
	}
	$viewurl=genUrl("view.php?tid={$newtopic['id']}");
	if($newi<4){
		$newtopicstr.="<li class='bigtitle'><a href=\"{$viewurl}\" title=\"{$linktitle}\" target=\"_blank\">{$newtopic['title']}</a></li>";
	}else{
		$newtopicstr.="<li class='normaltitle'><a href=\"{$viewurl}\" title=\"{$linktitle}\" target=\"_blank\">【{$cache_forums[$newtopic['fid']]['forumname']}】{$newtopic['title']}</a></li>";
	}

}
print <<<EOT
-->
<ul>{$newtopicstr}</ul>
			</td>
		</tr>
	</table>
	</div>
</div>

<div class="div_out index_forum">
	<table class="title">
		<tr>
			<td class="left"></td>
			<td>论坛版块</td>
			<td class="right"></td>
		</tr>
	</table>
	<div class="index_fourm_out">
	<div class="div_clear" style="height:6px;"></div>
	
<!--
EOT;
foreach($cache_forums as $forum){
	if(intval($forum['pid'])>0 || (!empty($_GET['fid']) && intval($_GET['fid'])!=intval($forum['id']))){
		continue;
	}
	print<<<EOT
-->
	<div class="index_forum_1"><span class="folder_1" id="folder_{$forum['id']}" onclick="forumFolder({$forum['id']})">{$forum['forumname']}</span></div>
	<div class="div_out_inner index_forum_2" id="folderdiv_{$forum['id']}">
<!--
EOT;
	if(is_array($forum['childfid'])){
		foreach($forum['childfid'] as $cfid){
			$childforum=$cache_forums[$cfid];
			if($childforum['ishidden']=='1'){continue;}
			$forumurl=genUrl("forum.php?fid={$cfid}");
			$viewurl=genUrl("view.php?tid={$childforum['lasttid']}");
			$childforum['lastuser']=htmlFilter($childforum['lastuser']);
			if($forum['showtype']=='0'){
				print<<<EOT
-->
			<table class="index_a3"><tbody><tr><td class="index_a3_0"><img src="{$childforum['forumicon']}" border="0" /></td><td class="index_a3_1"><b><a href="{$forumurl}">{$childforum['forumname']}</a></b> (今日:<b class="today">{$childforum['todaynum']}</b>)<p>{$childforum['forumcontent']}</p><p>版主: {$childforum['adminsstr']}</p></td><td width="140px" align="center"><span class="topicsnum">{$childforum['topicsnum']}</span> / {$childforum['postsnum']}</td><td width=""><a href="{$viewurl}">{$childforum['lastpost']}</a><br /><a href="user.php?username={$childforum['lastuser']}">{$childforum['lastuser']}</a> - <span class="time">{$childforum['lastposttime']}</span></td></tr></tbody></table>
<!--
EOT;
			}else{
				print<<<EOT
-->
			<div class="index_b"><table class="index_b3"><tbody><tr><td class="index_b3_0"><img src="{$childforum['forumicon']}" border="0" /></td><td class="index_b3_1"><b><a href="{$forumurl}">{$childforum['forumname']}</a></b> (今日:<b class="today">{$childforum['todaynum']}</b>)<br />主题:{$childforum['topicsnum']}  &nbsp;帖子:{$childforum['postsnum']}<br /><span class="lastpost">最后发表:<a href="{$viewurl}">{$childforum['lastuser']}</a></span></td></tr></tbody></table></div>
<!--
EOT;
			}
		}
	}
	print<<<EOT
-->
	<div class="div_clear"></div>
	</div>
<!--
EOT;
}
print<<<EOT
-->
	</div>
</div>
<div class="div_clear" style="height:12px;"></div>
<div class="div_out index_else">
	<table class="title">
		<tr>
			<td class="left"></td>
			<td>论坛其他</td>
			<td class="right"></td>
		</tr>
	</table>
	<div class="index_else_out">
		<div class="index_a4"><b><a href="online.php">在线用户</a></b> - 共 <b>{$online_allnum}</b> 人在线, <b>{$online_usernum}</b> 位会员, <b>{$online_guessnum}</b> 位访客, 最多 <b>{$cache1['mostonlinenum']}</b> 人发生在 <b>{$cache1['mostonlinetime']}</b> </div>
<!--
EOT;
if(numFilter($cache_settings['indexmostonline'])>0){
print <<<EOT
-->
		<div class="index_a5"><img src="images/group/203.gif" border="0" align="absmiddle" /> 管理员&nbsp; <img src="images/group/202.gif" border="0" align="absmiddle" /> 超级版主&nbsp; <img src="images/group/201.gif" border="0" align="absmiddle" /> 版主&nbsp; <img src="images/group/204.gif" border="0" align="absmiddle" /> 荣誉会员&nbsp; <img src="images/group/1.gif" border="0" align="absmiddle" /> 会员&nbsp;</div>
		<div class="index_a5_online">
		<ul>
<!--
EOT;

foreach($index_onlines as $online_online){
print<<<EOT
-->
		<li><img src="images/group/{$online_online['onlineicon']}.gif" border="0" align="absmiddle" /> {$online_online['name']}</li>
<!--
EOT;
}
print<<<EOT
-->		
		</ul>
		</div>
<!--
EOT;
}
print<<<EOT
-->			
		<div class="index_a4"><b>友情链接</b></div>
		<div class="index_a6">
<!--
EOT;
foreach($cache_links_logo as $link){
print<<<EOT
-->
		<a href="{$link['url']}" target="_blank" title="{$link['content']}"><img src="{$link['logo']}" border="0" /></a>
<!--
EOT;
}
print<<<EOT
-->
	</div>
	<div class="index_a7">
<!--
EOT;
foreach($cache_links_text as $link){
print<<<EOT
-->
		<p><a href="{$link['url']}" target="_blank" title="{$link['content']}">{$link['name']}</a></p>
<!--
EOT;
}
print<<<EOT
-->
	<div class="div_clear" style="height:1px;"></div>
    </div>
	</div>
</div>
{$adcode[2]}
<script type="text/javascript" src="getfiles.php?t=js&v={$_SYS['VERSION']}&f=util|index"></script>
<!--
EOT;
if(!empty($announce_index)){
print <<<EOT
-->
<script type="text/javascript">
window.onload=function(){
       var o=E("announce_index_div");
       window.setInterval(function(){scrollup(o,22,0);},3000);
}
</script>
<!--
EOT;
}
print <<<EOT
-->

<!--
EOT;
?>
-->